package com.titan.single.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author zeki
 */
@Data
@TableName("user")
@AllArgsConstructor
@NoArgsConstructor
public class User {

    //主键id
    @TableId(type = IdType.AUTO)
    private Integer id;

    // 名字
    private String userName;

    // 年龄
    private Integer age;

    // 存款
    private BigDecimal deposit;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
